<?php
// Writed by William Chu 2013
// email: zhugd168 (at) gmail (dot) com

$my_name = 'createjs';
$my_url = 'index.php?cat=plugins&amp;p='.$my_name;

  $choix = isset($_POST['choix']) ? $_POST['choix'] : '';
  $pref = $CONFIG['db_prefix'].'_link';
  $limit = 6;
  define(CFG_PUCCACHE_TIME, 24 * 60 * 60);
  
  	//	include fonctions
	require_once ('functions.php');
  
// create newest,top-votes,top-ranks,top-prrank links javascript for other website app calling
if(!empty($choix))
{
	$choix = htmlentities($choix);

	switch ($choix)
	{	
		case '1':	
		$_type = 'id';
		topjs($choix,$_type,$limit);
		break;
		
		case '2':		
		$_type = 'hits';
		topjs($choix,$_type,$limit);
		break;
		
		case '3':		
		$_type = 'pr';
		topjs($choix,$_type,$limit);
		break;
		
		case '4':	
		$_type = 'vote';
		topjs($choix,$_type,$limit);
		break;
		
		case '6':	
		$_typeno = '1';
		$_type = 'id';
		topjs($_typeno,$_type,$limit);
		
		$_typeno = '2';
		$_type = 'hits';
		topjs($_typeno,$_type,$limit);
		
		$_typeno = '3';
		$_type = 'pr';
		topjs($_typeno,$_type,$limit);
		
		$_typeno = '4';
		$_type = 'vote';
		topjs($_typeno,$_type,$limit);
		break;
		
		default:
		break;
	}	
	buffer::str($lang['createjs_complete']);
}


 buffer::str('<h2><p align="center">'.$lang['createjs_title'].'</p></h2>');
 buffer::str('<div align="center">
 <form action="'.$my_url.'" method="post" >
 <table border="0">
  <tr>
  <td>'.$lang['createjs_choix'].'
       <br />
      '.$lang['createjs_newest10'].'<input type="radio" name="choix" value="1">
      <br />
      '.$lang['createjs_tophits'].'<input type="radio" name="choix" value="2">
      <br />
      '.$lang['createjs_topvotes'].'<input type="radio" name="choix" value="3">
      <br />
      '.$lang['createjs_topprrank'].'<input type="radio" name="choix" value="4">
      <br />
      '.$lang['createjs_all'].'<input type="radio" name="choix" value="6">
      <br />
          <input type="submit" name="submit" value="'.$lang['createjs_send'].'">
			</td>
		</tr>
</table>
</form>
</div>');

?>
